import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class PromptAction {
  // 正常
  static void showToastWithoutIcon(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color(0xFFFF9494),
      textColor: Colors.white,
      fontSize: 16.0,
      webBgColor: '#FF9494',
      webPosition: 'center',
    );
  }

  // 成功
  static void showToast(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color(0xFFe9c358),
      textColor: Colors.white,
      fontSize: 16.0,
      webBgColor: '#e9c358',
      webPosition: 'center',
    );
  }

  // 失败
  static void showErrorToast(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color(0xFFed5842),
      textColor: Colors.white,
      fontSize: 16.0,
      webBgColor: '#ed5842',
      webPosition: 'center',
    );
  }
}
